// node 所有异步都基于event 

const EventEmitter = require('events')

const myEmitter = new EventEmitter()

myEmitter.on('event', (item) => {
  console.log(`${item || ''} an event occurred!`)  
})

myEmitter.emit('event')
myEmitter.emit('event', 'joseph')
